package com.hyphenate.easeim.common.db.dao

import androidx.lifecycle.LiveData
import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.hyphenate.easeim.common.db.entity.EmUserEntity
import com.hyphenate.easeui.domain.EaseUser

/**
 * @Time:2021/5/6 10:10
 * @Author:wujinsheng
 * @Description:
 */
@Dao
interface UserDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(vararg users: EmUserEntity): List<Long>

    @Query("select * from em_users where username = :arg0")
    fun loadUserById(arg0: String): LiveData<List<EaseUser>>
}